n = int(input())
maxScore = 0
maxStudent = {}
for _ in range(n):
    studentInfo = input().split()
    scoreTotal = int(studentInfo[-1])+int(studentInfo[-2])+int(studentInfo[-3])
    if scoreTotal > maxScore:
        maxScore = scoreTotal
        maxStudent['id'] = studentInfo[0]
        maxStudent['name'] = studentInfo[1]
        maxStudent['score'] = maxScore
print("{:s} {:s} {:d}".format(maxStudent['name'],maxStudent['id'],  maxStudent['score']))